package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderHistoryVO;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;

public interface OrderService {
    OrderSubmitVO addOrder(OrdersSubmitDTO dto);

    PageResult queryHistoryOrders(OrdersPageQueryDTO dto);

    OrderHistoryVO queryOrderDetailByOrderId(Long id);

    void repeatOrder(Long orderId);

    void cancelOrder(Long orderId);

    PageResult queryHistoryOrdersAndDishes(OrdersPageQueryDTO dto);

    OrderStatisticsVO count();

    void acceptOrder(Long id);

    void rejectOrder(OrdersRejectionDTO dto);

    void cancelOrderByAdmin(OrdersCancelDTO dto);

    void deliverOrder(Long id);

    void completeOrder(Long id);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    void reminder(Long orderId);
}
